package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.DropBehavior;
import com.yanmaohu.yulia.bean.SchemaQualifiedName;
import com.yanmaohu.yulia.bean.TransformsToBeDropped;

/**
 * @author Bright Lee
 */
public final class DropTransformStatement implements SqlSchemaManipulationStatement {

    private int beginIndex;
    private int endIndex;
    private boolean transform;
    private boolean transforms;
    private TransformsToBeDropped transformsToBeDropped;
    private SchemaQualifiedName schemaResolvedUserDefinedTypeName;
    private DropBehavior dropBehavior;

    public DropTransformStatement(int beginIndex,
                                  boolean transform,
                                  boolean transforms,
                                  TransformsToBeDropped transformsToBeDropped,
                                  SchemaQualifiedName schemaResolvedUserDefinedTypeName,
                                  DropBehavior dropBehavior) {
        this.beginIndex = beginIndex;
        this.endIndex = dropBehavior.getEndIndex();
        this.transform = transform;
        this.transforms = transforms;
        this.transformsToBeDropped = transformsToBeDropped;
        this.schemaResolvedUserDefinedTypeName = schemaResolvedUserDefinedTypeName;
        this.dropBehavior = dropBehavior;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isTransform() {
        return transform;
    }

    public boolean isTransforms() {
        return transforms;
    }

    public TransformsToBeDropped getTransformsToBeDropped() {
        return transformsToBeDropped;
    }

    public SchemaQualifiedName getSchemaResolvedUserDefinedTypeName() {
        return schemaResolvedUserDefinedTypeName;
    }

    public DropBehavior getDropBehavior() {
        return dropBehavior;
    }

}
